package 笔试.顺丰笔试.第二题赏金猎人;

class Task implements Comparable<Task> {
    long start;
    long end;
    long value;
    public Task(long s,long e,long v){
        start = s;
        end = e;
        value = v;
    }
    public int compareTo(Task t) {
        if(start == t.start) return (int)(end - t.end);//开始时间一样按结束时间，否则按开始时间
        else return (int)(start - t.start);
    }
}